<!doctype html>
<html class="no-js" lang="en">
  <head>
    <title>ToDo Application</title>
  </head>

  <body>
    <div>
      <h1>ToDo Application</h1>


      {% for job in jobs %}
        <p>
         ID: <b><i>{{job.id}}</b></i> TITLE: <b><i>{{ job.title }}</b></i> DESC: <b><i>{{ job.description }}</b></i> DONE: <b><i>{{ job.done }}</b></i> CREATED: <b><i>{{ job.created_at }}</b></i>
        </p>
        <hr>
      {% empty %}
      No jobs yet!
      {% endfor %}
    </div>

    <div>
      <h2>Create new job</h2>

      {% if messages %}
      <ul>
        {% for message in messages %}
            <li>{{ message }}</li>
        {% endfor %}
      </ul>
      {% endif %}

      <form method="POST" action="{% url 'todo:create' %}">
        {% csrf_token %}

        <input type="text" placeholder="title" name="title">
        <input type="text" placeholder="description" name="description">
        <label>
          <input type="checkbox" name="done">
          done
        </label>

        <input type="submit" value="Save">
      </form>
    </div>
  </body>
</html>
